package com.guigusuqi.commonutils.config;

import com.alibaba.druid.pool.DruidDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class DruidDatasrouceConfig {

    /**
     * DruidDatasourceConfig
     *
     * @return DataSource
     */
    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DruidDataSource druidDataSource()
    {
        DruidDataSource druidDataSource = new DruidDataSource();
        return druidDataSource;
    }
}
